﻿using KZ.Express.Resource;
using System;
using System.Collections.Generic;

namespace KZ.Express.ENT
{
    public class PriceListENT : EntityBase
    {
        public PriceListENT()
        {
            this.PriceListDetails = new List<PriceListDetailENT>();
        }

        [Output]
        public virtual int PriceListID { get; set; }

        [Require]
        public string PriceListCode { get; set; }

        [Require]
        public string PriceListName { get; set; }

        [Require]
        public int? CarrierID { get; set; }

        [Require]
        public int? ZoneID { get; set; }

        [Require]
        public DateTime? EffectedDate { get; set; }

        [Require]
        public DateTime? ExpiredDate { get; set; }

        public bool IsOriginal { get; set; }

        [NotInsertUpdate]
        public override string Table { get { return "PriceLists"; } }

        /// <summary>
        /// proc_PriceList_Insert
        /// </summary>
        [NotInsertUpdate]
        public override string InsertProcedure { get { return "proc_PriceList_Insert"; } }

        /// <summary>
        /// proc_PriceList_Update
        /// </summary>
        [NotInsertUpdate]
        public override string UpdateProcedure { get { return "proc_PriceList_Update"; } }

        /// <summary>
        /// proc_PriceList_Select
        /// </summary>
        [NotInsertUpdate]
        public override string SelectProcedure { get { return "proc_PriceList_Select"; } }

        [NotInsertUpdate]
        public List<PriceListDetailENT> PriceListDetails { get; set; }
    }

    public class OriginalPriceListENT : PriceListENT
    {
        public OriginalPriceListENT()
            : base()
        {
        }

        [Output]
        public override int PriceListID { get; set; }

        [Require]
        public int? SupplierID { get; set; }
    }

    public class CustomerPriceListENT : PriceListENT
    {
        public CustomerPriceListENT()
            : base()
        {
        }

        [Output]
        public override int PriceListID { get; set; }

        public int? SupplierID { get; set; }
    }
}